package com.nerve.cloudoffice.service;

import java.util.Map;

import com.nerve.cloudoffice.domain.User;
import com.nerve.cloudoffice.web.model.IndexModel;
import com.nerve.cloudoffice.web.model.UserModel;

public interface UserService {
	
	/*
	 * 更新的类型
	 */
	public static final int PASSWORD = 0;
	public static final int POSITION = 1;
	public static final int UNABLE = 2;
	public static final int DEPARTMENT = 3;
	public static final int CELLPHONE = 4;
	
	public void save(UserModel model) throws Exception;
	
	/**
	 * 更新用户
	 * 更新方式有以下：
	 * 	密码
	 * 	职位
	 * 	可用状态
	 * 	部门
	 * @param model
	 * @throws Exception
	 */
	public void update(UserModel model) throws Exception;
	
	public void list(UserModel model) throws Exception;
	
	public User login(String name, String pass) throws Exception;
	
	public Map<String, Integer> countNotify(IndexModel model) throws Exception;
	
	public void updateBatch(UserModel model) throws Exception;
}
